<?php

namespace  App\Models;
use Illuminate\Database\Eloquent\Model;


/**
 * This is the model class for table "system".
 *
 * @property int $id
 * @property string $alimama_pid
 * @property string $jd_key
 * @property string $taobao_key
 * @property string $pdd_key
 * @property string $tao_word,
 * @property int $max_wx_groups
 *
 */
class System extends Model implements IReadable
{
    protected $table =  'system_config';

    protected $guarded = [];

    public static function getConfig()
    {
        return self::query()
            ->orderBy("id", "asc")
            ->first();
    }
    
    public function attributeLabels()
    {
        return [
          //  'alimama_pid' => '阿里妈妈pid',
         //   'channel_id' =>  '渠道ID',
         //   "jd_key" => "京东授权key",
          //  "jd_pid" => " 京东pid",
      //      "pdd_pid" => "拼多多pid",
         //   "taobao_key" => "淘宝授权key",
        //    "pdd_key" => "拼多多授权KEY",


            'pdd_pid' => [
                'label' => '全局拼多多推广位ID(p_id)',
                'type' => 'text'
            ],

          /*  'jd_pid' => [
                'label' => '京东推广ID(positionId)',
                'type' => 'text'
            ],*/

            "robot_interval" => [
                'label' => '机器人发送频率(单位:分)',
                'type' => 'text',
                'value' => '10'
            ],
            'max_wx_groups' => [
                'label' => '最高群组数',
                'type' => 'integer',
                'value' => '10'
            ],
       //     "domain" => " 自定义域名",
          /*  "wall_id" => [
                'label' => "海报id",
                'type' => "integer",
            ],*/
          /*  "rebate" => [
                'label' => "返利比例%",
                'type' => "integer",
            ],*/
          //  "tao_word" => "淘口令符号",

          //  "short_uri_id" => "短网址设置",
            /*"display" => [
                'type' => "radio",
                'label' => "代理端是否显示选品",
                'options' => [
                    '不显示', '显示'
                ]
            ],*/
         //   "user_id" => "所属用户",
        ];
    }
}
